package sk.ygor.raynor.client.reflection;

public class JSONServiceInfo {

    public final String servicePackageName;
    public final String serviceClassName;
    public final ServiceMethod[] methods;

    public JSONServiceInfo(String servicePackageName, String serviceClassName, ServiceMethod[] methods) {
        this.servicePackageName = servicePackageName;
        this.serviceClassName = serviceClassName;
        this.methods = methods;
    }

    public static class ServiceMethod {
        public final String name;
        public final String returnTypeRef;
        public final Parameter[] parameters;

        public ServiceMethod(String name, String returnTypeRef, Parameter... parameters) {
            this.name = name;
            this.returnTypeRef = returnTypeRef;
            this.parameters = parameters;
        }

        public static class Parameter {
            public final String name;
            public final String typeRef;

            public Parameter(String name, String typeRef) {
                this.name = name;
                this.typeRef = typeRef;
            }
        }

    }
}
